function doSubmit() {
	if ($('#username').val().trim() == "") {
		swal('登录失败', '请输入用户名', 'error');
		return false;
	}
	if ($('#password').val().trim() == "") {
		swal('登录失败', '请输入密码', 'error');
		return false;
	}
	var username = $('#username').val();
	var password = SparkMD5.hash(SparkMD5.hash($('#password').val()));
	var remember = $('#remember').is(":checked");
	var data = {
		'username': username,
		'password': password,
		'remember': remember
	};
	
	$.ajax({
		'url': '/user/LoginCheck',
		'type': 'POST',
		'dataType': 'JSON',
		'data': data,
		'success': function (ret) {
			console.log(ret);
			if (ret.code == 0 || ret.code == '0'){
				// swal('登录成功', '', 'success');
				var return_uri = $('#return_uri').val();
				window.location.href = return_uri ? return_uri : '/';
			} else {
				swal('登录失败', ret.msg, 'error');
			}
		}
	});
	return false;
}
$(function (){
	$('input#remember').iCheck({
        checkboxClass: 'icheckbox_square-blue',
        radioClass: 'iradio_square-blue',
        increaseArea: '20%' // optional
    });
})